
package cn.hzc.fortess.core.common;


public enum BizErrorEnum {


    //保留的状态码，不能修改
    SUCCESS(200, "请求成功"),
    SERVER_ERROR(500, "服务器异常"),


    /**
     * 权限和数据问题
     */
    NO_PERMITION(4000, "权限异常"),
    INVALID_KAPTCHA(4001, "验证码不正确"),
    CANT_DELETE_ADMIN(4002, "保留的角色,不能删除"),
    CANT_FREEZE_ADMIN(4003, "不能冻结超级管理员"),
    CANT_CHANGE_ADMIN(4004, "保留的角色，禁止编辑"),
    CANT_ADMIN_NAME(4005, "保留的角色名称"),
    CANT_DELETE_MENU(4006, "保留的菜单,不能删除"),
    CANT_RESET_ADMIN_PWD(4007, "您没有权限重置管理员密码"),
    CANT_DELETE_SAM(4008, "权限系统无法删除"),
    CANT_DELETE_ADMIN_USER(4009, "不能删除系统超级管理员"),
    CANT_EDIT_STATUS(4010, "状态不允许修改"),
    CANT_OUT_LEVEL(4011, "树状层级超出系统限制"),
    CANT_EDIT_ROOT_DEPT(4012, "不允许修改根组织"),
    CANT_DELETE_SETING(4013, "系统配置不能删除"),
    CANT_DATABASE_UNIQUE_KEY(4014, "Database Unique Key Constraints"),
    SETTING_DATA_NONE(4015, "配置数据未初始化"),
    CANT_REPEAT_DATA(4016, "检测到重复的数据"),


    /**
     * 账户问题
     */
    NOT_LOGIN(4100, "当前用户未登录"),
    USER_ALREADY_REG(4101, "该用户已经注册"),
    USER_NOT_EXISTED(4102, "没有此用户"),
    ACCOUNT_FREEZED(4103, "账号被冻结"),
    OLD_PWD_NOT_RIGHT(4104, "原密码不正确"),
    TWO_PWD_NOT_MATCH(4105, "两次输入密码不一致"),

    /**
     * 错误的请求
     */
    MENU_BUTTON_ADDSUB(4201, "BUTTON menu does not allow the next level"),
    PROJECT_EXIST(4202, "该项目已经存在"),

    SESSION_TIMEOUT(5000, "会话超时"),
    WRITE_ERROR(5001, "渲染界面错误"),
    REQUEST_NULL(5002, "参数错误"),
    REQUEST_NOT_ALLOW(5003, "不允许的操作"),
    REQUEST_DEPT_PARENTID_ERROR(5004, "请选择有效的上级部门");

    BizErrorEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    private Integer code;

    private String message;

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
